nethackfandomcom-20200214-history
Container
A container usually means one of the following items: large box, chest, ice box, sack, oilskin sack or bag of holding. Each can store an unlimited number of items (objects or money), but may become too heavy to lift as a consequence. You can open an unlocked container by using the #loot command. Note that even though the bag of tricks is defined with the CONTAINER-macro in objects.c, you cannot put items in it. A statue can also function as a container; this causes messages like, "The statue of the Foo is empty."end.c#line948 The contents correspond to the inventory of that monster before it was stoned. Some statues are generated with spellbooks inside. General properties of containers As long as a container is not destroyed or polymorphed, all its contents stay unchanged, protected from any magical or physical influence, with four exceptions: * Rot. Only the ice box preserves eggs and corpses from (further) rotting, in other containers they rot as usual. Furthermore, trolls will resurrect in containers, unless the container is locked. ("A writhes out of a in your pack!" if in inventory, "A escapes from a !" if not.) * Water. If you get into or under the water without wearing a oilskin cloak, only a non-cursed oilskin sack, a chest, an ice box, or a large box completely protects its contents from the water damage. Other containers offer only partial protection. * Fragile objects. If a container is kicked, thrown, or dropped from height, fragile objects in it may break (except in a bag of holding, see below). * Opening a cursed bag of holding. Each time you do it, some of its contents may vanish. In particular, containers completely protect their contents from fire, cold, shock, cancellation, being stolen (by nymphs, apes, leprechauns), being identified, and any change of their BUC. There is no monster in the game that can access containers' contents (but see below for gelatinous cubes). When you carry a container, its contents do not take up slots (letters) in your inventory. Therefore, you can normally carry only 52 objects (counting each stack of objects, like 5 food rations, as one) in your main inventory, but an unlimited number of objects in each container. If a container (other than a bag of holding) is kicked, thrown, or dropped from a height, fragile contents (glass items, all potions, mirrors, eggs, etc.) may be destroyed. Kicking a locked large box or chest may also break it open, triggering a trap if applicable. The unique items cannot be placed into containers. The cheap plastic imitation of the Amulet of Yendor can, however; this may be used to tell it from the real thing. All of the containers except ice boxes can be eaten by gelatinous cubes; the contents will be engulfed but unharmed. They can be found on the cube's corpse. When a container is polymorphed (even to another container, or even to the same container), all of its contents are destroyed. Containers within containers Generally, containers may contain other containers. However, there are exceptions. * Large boxes, ice boxes, and chests are too big to fit into any other container. * If you put a bag of holding, bag of tricks, or wand of cancellation into a bag of holding, the bag will explode, destroying all its contents including the item that caused the explosion. See the bag of holding section below for more info. Generation Containers are generated uncursed, with the contents as described below. Containers will not be generated containing tools, weapons, armour, or rocks. Containers in your initial inventory will be empty. If the container can be locked, then there is an 80% chance that it will be generated locked and, independently, a 10% chance that it will be trapped. Tools can be generated in the main dungeon (8% of all objects) and Gehennom (12% of all objects). Each tool has the given probability of being a container. Quantum mechanics may carry a large box containing a housecat named Schrödinger's cat. Items generated in a container (other than an ice box) will each be one of the following types: Weapons, armor, and tools (including other containers) will never be generated in a container. Gold generated in containers will be 2.5 times the usual amount. Gemstones, glass, luckstones, and loadstones can all be generated, but flint stones, touchstones, and rocks cannot. A wand of cancellation will never be generated in a bag of holding. Unlocking To unlock a chest or large box, you can: * Apply some unlocking tool to it. * Zap a wand of opening at it. * Kick it. Because this often destroys some of the items (e.g. potions) inside, it's not the best method. *#force the lock with a weapon. Using a blunt weapon (such as a war hammer or mace) will exercise strength but risks destroying the container and/or its contents. Using a sharp weapon (such as a dagger or sword) will exercise dexterity but risks destroying the weapon. * Cast knock at it Large box Large boxes are waterproof, and an excellent stash container - they are slightly more common than chests and lighter for transporting to a convenient altar. They have a 10% chance of being trapped. Chest Chests are waterproof. They have a 10% chance of being trapped. Encyclopaedia entry Ice box An ice box is a very heavy container, the main use of which is to keep corpses fresh. Corpses in an ice box will not age and will remain fit to eat or sacrifice indefinitely. They will continue decaying where they left off when removed from the box, and will be tainted if they were before being placed in the box. Ice boxes are rare, but are occasionally randomly generated in the dungeons and can also appear in general stores, delicatessens, and hardware stores. An ice box can have up to 20 corpses in it, and some might be too heavy to remove. However, as long as no one corpse is too heavy to carry, it's possible to patiently #loot and then drop (or eat) the corpses untill the box is empty. If a container is polymorphed into a non-container, all items that were in it, including heavy corpses, will be destroyed. (In Slash'EM, polymorphing items is temporary, so a polymorphed ice box will eventually revert to a useful empty one.) Some players bring an ice box containing booze and snacks for the demigod bar when they ascend. Because ice boxes are heavy, this is a challenge (unless they are wished for just before ascending). Ice boxes are waterproof. They have no locks. Potions do not freeze or shatter in an ice box. In Slash'EM, there is a new type of shop, the frozen food store, which contains mainly ice boxes. Sack A sack is the simplest kind of container. It merely stores items; its main function is to avoid the 52-item inventory limit, though it also protects its contents from fire, cold and other damages. It is extremely cheap. When non-greased sacks get wet, their contents may get wet. Greasing the sack protects against this, but the grease may wear off. Sacks should be upgraded to oilskin sacks or preferably bags of holding as soon as possible. Attempting to place a sack into itself yields the message "that would be an interesting topological exercise." Encyclopaedia entry Bag of holding A bag of holding is one of the most coveted items in NetHack. Placing items into a bag of holding makes them weigh less; the effect is that you can carry more items. Bags of holding, oilskin sacks, and bags of tricks cost 100, while normal sacks cost 2. (Make sure there is nothing in the bag when you check the price.) Bags of tricks are easily identifiable (better to #loot in a shop than to pay a usage fee!), and if your encumbrance changes if you put something in the bag, it's a bag of holding and not an oilskin sack. At the end of Sokoban, there's a 50% chance of there being a bag of holding (the other 50%, there's an Amulet of reflection). In Vulture's Eye, a bag of holding always weighs 16 (empty). The weight of a bag of holding (wgt) - including the 15 for the bag itself - depends on the weight of its contents (cwgt) and its BUC: blessed: wgt = 15 + (cwgt + 3)/4 uncursed: wgt = 15 + (cwgt + 1)/2 cursed: wgt = 15 + cwgt*2 Roughly speaking, bags of holding halve the weight of the objects contained, blessed bags divide it by four, and cursed bags double it. You may also lose items when you use a cursed bag of holding; each item in the bag has a 1/13 chance of disappearing each time you apply or loot the bag. Some items should not be held in a bag of holding and may make the bag explode, destroying ALL its contents. These items are: *other bags of holding *bags of tricks with non-zero charges remaining *wands of cancellation with non-zero charges remaining The first two are straightforward; the wand can be trickier. To be safe, do not put any unidentified wands inside the bag that make engravings disappear (this includes cancellation, teleportation, and make invisible). It is sometimes possible to put one of these items into nested sacks and/or oilskin sacks and then place them safely inside a bag of holding. The chance of an explosion occurring then depends on the amount of nestingpickup.c#line1740: sacks: 0 1 2 3 4 5 6 7 8 n, where n>6 odds: 1/1 2/2 3/4 4/8 5/16 6/32 7/64 8/128 9/128 (n+1)/128 ~%: 100 100 75 50 31 19 11 6.25 7.03 If they do not explode, the effect of the two bags will, as expected, be cumulative: If both are blessed, any items in the "inner" bag will have their weight reduced to about 1/16. If you put the nested bags of holding in more sacks and put that in another bag of holding, then it checks for both nested bags, so, if you use 7 sacks between each bag of holding like this (H for bag of holding, s for sack): HsssssssHsssssssH, the odds would be 8/128 for the first nesting, and then 8/128 and 16/128 for the second. Doing both nestings gives roughly a 23% chance that something will explode. Going for 4 is roughly a 52% chance of something exploding. If you find a bones pile with a cursed bag of holding, zap it with a wand of cancelation. This will only uncurse the bag of holding and does not affect its holdings. Every time you try to open a cursed bag of holding, each of its contents has a 1/13 chance to disappear. When non-greased bags of holding get wet, their contents may get wet. Greasing the bag protects against this, but the grease may wear off. Strategy Many players name a plain sack something like "Cancel" or "Don't ever put this in BoH!" and keep what could be wands of cancellation in that sack as a safety measure. Some players either consider the 6.25% chance of explosion to be an acceptable riskhttp://groups.google.co.uk/group/rec.games.roguelike.nethack/msg/3c393a4f7b6a432f? or assume from a test in wizard mode that it is safe. If you are confident you can withstand the explosion, you can risk it before you leave the main dungeon in order to increase your score or bring specific items to the ascension bar. Bag of tricks A bag of tricks looks like an ordinary bag, but contains nasty surprises for prospective #looters. When a bag of tricks is #looted, it will bite you (1 to 10 hit points damage) and become identified. If you (a)pply it and it has charges left, it will create one monster (22/23 chance), or create 2 to 8 monsters (1/23 chance). "Nothing happens" when you apply a bag with zero charges. Bags of tricks are generated with 1 to 20 charges. If the bag has more than 10 charges, a blessed scroll of charging will add 6 to 10 charges, otherwise it will add 6 to 15 charges; an uncursed scroll will always add 1 to 5 charges. It cannot be charged higher than 50 charges. Placing a bag of tricks with nonzero charges into a bag of holding will cause a magical explosion, destroying both bags and all their contents. Strategy If carrying a bag of holding, bags of tricks should be treated with the same caution as a wand of cancellation. Unless you need to create some monsters (for food, sacrifice, or experience), they are often best left alone. A magical explosion can be a game-ending mistake. If you only want the bag to polypile with, apply it until it runs out of charges. Make sure you can deal with the generated monsters! You know the bag is empty when "nothing happens" when you apply it. An uncharged bag of tricks is "safe", and if it polymorphs into another charged tool, the new tool's charges will be independent of the number of charges the bag had. Oilskin sack The oilskin sack behaves exactly as the regular sack, with the exception that a blessed or uncursed oilskin sack will protect the items it contains from becoming wet. A cursed oilskin sack only protects its contents two-thirds of the time. Encyclopaedia entry Source code references Category:Tools